package com.apes.scm.masterdata.frame.repository;

import com.apes.framework.jpa.repository.CustomRepository;
import com.apes.scm.masterdata.frame.model.Organization;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface OrganizationRepository extends CustomRepository<Organization, String> {

    @Query("select T from Organization T where 1 = 1 and (id like %:value%  or name like %:value%) ")
    Page<Organization> find(@Param("value") String value, Pageable pageable);
}
